<!--
  
   GameContextMenu.xaml
  
   Copyright (c) 2007 Mike Strobel
  
   This source code is subject to the terms of the Microsoft Reciprocal License (Ms-RL).
   For details, see <http://www.opensource.org/licenses/ms-rl.html>.
  
   All other rights reserved.
  
  -->
<ResourceDictionary
  xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:local="clr-namespace:Supremacy.Client"
  xmlns:s="clr-namespace:Supremacy.Client;assembly=SupremacyWPF">


  <!-- MOUSE OVER SOUND STYLE -->
  <Style TargetType="{x:Type MenuItem}">
    <Style.Triggers>
      <Trigger Property="IsEnabled"
               Value="False">
        <Setter Property="Opacity"
                Value="0.25"/>
      </Trigger>
      <EventTrigger RoutedEvent="MenuItem.Click">
        <EventTrigger.Actions>
          <SoundPlayerAction Source="Resources/UI/Federation/Sounds/GameContextMenuItem.wav"/>
        </EventTrigger.Actions>
      </EventTrigger>
    </Style.Triggers>
  </Style>


  <!-- 
    ***************************
    * GAME CONTEXT MENU STYLE *
    ***************************
  -->
  <Style TargetType="{x:Type local:GameContextMenu}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type local:GameContextMenu}">
          <Border Background="{TemplateBinding Background}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Canvas Width="252" Height="236">
              <Canvas.Resources>
                <BitmapImage x:Key="Image_Main1" UriSource="pack://siteoforigin:,,,/Resources/UI/Cardassians/ContextMenu/main1.png"/>
                <BitmapImage x:Key="Image_Main2" UriSource="pack://siteoforigin:,,,/Resources/UI/Cardassians/ContextMenu/main2.png"/>
                <BitmapImage x:Key="Image_Dip1" UriSource="pack://siteoforigin:,,,/Resources/UI/Cardassians/ContextMenu/embassy1.png"/>
                <BitmapImage x:Key="Image_Dip2" UriSource="pack://siteoforigin:,,,/Resources/UI/Cardassians/ContextMenu/embassy2.png"/>
                <BitmapImage x:Key="Image_Intel1" UriSource="pack://siteoforigin:,,,/Resources/UI/Cardassians/ContextMenu/intel1.png"/>
                <BitmapImage x:Key="Image_Intel2" UriSource="pack://siteoforigin:,,,/Resources/UI/Cardassians/ContextMenu/intel2.png"/>
                <BitmapImage x:Key="Image_Menu1" UriSource="pack://siteoforigin:,,,/Resources/UI/Cardassians/ContextMenu/menu1.png"/>
                <BitmapImage x:Key="Image_Menu2" UriSource="pack://siteoforigin:,,,/Resources/UI/Cardassians/ContextMenu/menu2.png"/>
                <BitmapImage x:Key="Image_Science1" UriSource="pack://siteoforigin:,,,/Resources/UI/Cardassians/ContextMenu/science1.png"/>
                <BitmapImage x:Key="Image_Science2" UriSource="pack://siteoforigin:,,,/Resources/UI/Cardassians/ContextMenu/science2.png"/>
                <BitmapImage x:Key="Image_Systems1" UriSource="pack://siteoforigin:,,,/Resources/UI/Cardassians/ContextMenu/system1.png"/>
                <BitmapImage x:Key="Image_Systems2" UriSource="pack://siteoforigin:,,,/Resources/UI/Cardassians/ContextMenu/system2.png"/>
              </Canvas.Resources>
              <Image Canvas.Left="76" Canvas.Top="50" Source="{s:ImageResource 'Resources/UI/Cardassians/ContextMenu/popup.png'}" />
              <MenuItem x:Name="MenuItem_Main" Canvas.Left="57" Canvas.Top="0" Command="{x:Static local:GameContextMenu.MainCommand}">
                <MenuItem.Template>
                  <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Image x:Name="MenuItemContent_Main" Source="{StaticResource Image_Main2}"/>
                    <ControlTemplate.Triggers>
                      <Trigger Property="IsMouseOver" Value="True">
                        <Setter TargetName="MenuItemContent_Main" Property="Source" Value="{StaticResource Image_Main1}"/>
                      </Trigger>
                      <Trigger Property="IsPressed" Value="True">
                        <Setter TargetName="MenuItemContent_Main" Property="Source" Value="{StaticResource Image_Main2}"/>
                      </Trigger>
                    </ControlTemplate.Triggers>
                  </ControlTemplate>
                </MenuItem.Template>
              </MenuItem>
              <MenuItem x:Name="MenuItem_Systems" Canvas.Left="176" Canvas.Top="62" Command="{x:Static local:GameContextMenu.SystemCommand}">
                <MenuItem.Template>
                  <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Image x:Name="MenuItemContent_Systems" Source="{StaticResource Image_Systems2}"/>
                    <ControlTemplate.Triggers>
                      <Trigger Property="IsMouseOver" Value="True">
                        <Setter TargetName="MenuItemContent_Systems" Property="Source" Value="{StaticResource Image_Systems1}"/>
                      </Trigger>
                      <Trigger Property="IsPressed" Value="True">
                        <Setter TargetName="MenuItemContent_Systems" Property="Source" Value="{StaticResource Image_Systems2}"/>
                      </Trigger>
                    </ControlTemplate.Triggers>
                  </ControlTemplate>
                </MenuItem.Template>
              </MenuItem>
              <MenuItem x:Name="MenuItem_Dip" Canvas.Left="0" Canvas.Top="123" Command="{x:Static local:GameContextMenu.DiplomacyCommand}">
                <MenuItem.Template>
                  <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Image x:Name="MenuItemContent_Dip" Source="{StaticResource Image_Dip2}"/>
                    <ControlTemplate.Triggers>
                      <Trigger Property="IsMouseOver" Value="True">
                        <Setter TargetName="MenuItemContent_Dip" Property="Source" Value="{StaticResource Image_Dip1}"/>
                      </Trigger>
                      <Trigger Property="IsPressed" Value="True">
                        <Setter TargetName="MenuItemContent_Dip" Property="Source" Value="{StaticResource Image_Dip2}"/>
                      </Trigger>
                    </ControlTemplate.Triggers>
                  </ControlTemplate>
                </MenuItem.Template>
              </MenuItem>
              <MenuItem x:Name="MenuItem_Science" Canvas.Left="0" Canvas.Top="62" Command="{x:Static local:GameContextMenu.ScienceCommand}">
                <MenuItem.Template>
                  <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Image x:Name="MenuItemContent_Science" Source="{StaticResource Image_Science2}"/>
                    <ControlTemplate.Triggers>
                      <Trigger Property="IsMouseOver" Value="True">
                        <Setter TargetName="MenuItemContent_Science" Property="Source" Value="{StaticResource Image_Science1}"/>
                      </Trigger>
                      <Trigger Property="IsPressed" Value="True">
                        <Setter TargetName="MenuItemContent_Science" Property="Source" Value="{StaticResource Image_Science2}"/>
                      </Trigger>
                    </ControlTemplate.Triggers>
                  </ControlTemplate>
                </MenuItem.Template>
              </MenuItem>
              <MenuItem x:Name="MenuItem_Intel" Canvas.Left="176" Canvas.Top="123" Command="{x:Static local:GameContextMenu.AffairsCommand}">
                <MenuItem.Template>
                  <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Image x:Name="MenuItemContent_Intel" Source="{StaticResource Image_Intel2}"/>
                    <ControlTemplate.Triggers>
                      <Trigger Property="IsMouseOver" Value="True">
                        <Setter TargetName="MenuItemContent_Intel" Property="Source" Value="{StaticResource Image_Intel1}"/>
                      </Trigger>
                      <Trigger Property="IsPressed" Value="True">
                        <Setter TargetName="MenuItemContent_Intel" Property="Source" Value="{StaticResource Image_Intel2}"/>
                      </Trigger>
                    </ControlTemplate.Triggers>
                  </ControlTemplate>
                </MenuItem.Template>
              </MenuItem>
              <MenuItem x:Name="MenuItem_Menu" Canvas.Left="57" Canvas.Top="186" Command="{x:Static local:GameContextMenu.MenuCommand}">
                <MenuItem.Template>
                  <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Image x:Name="MenuItemContent_Menu" Source="{StaticResource Image_Menu2}"/>
                    <ControlTemplate.Triggers>
                      <Trigger Property="IsMouseOver" Value="True">
                        <Setter TargetName="MenuItemContent_Menu" Property="Source" Value="{StaticResource Image_Menu1}"/>
                      </Trigger>
                      <Trigger Property="IsPressed" Value="True">
                        <Setter TargetName="MenuItemContent_Menu" Property="Source" Value="{StaticResource Image_Menu2}"/>
                      </Trigger>
                    </ControlTemplate.Triggers>
                  </ControlTemplate>
                </MenuItem.Template>
              </MenuItem>
            </Canvas>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Triggers>
      <EventTrigger RoutedEvent="ContextMenu.Opened">
        <EventTrigger.Actions>
          <SoundPlayerAction Source="Resources/UI/Federation/Sounds/GameContextMenu.wav"/>
        </EventTrigger.Actions>
      </EventTrigger>
    </Style.Triggers>
  </Style>

</ResourceDictionary>